import java.io.FileNotFoundException;
import java.util.Scanner;


public class DictionaryTest 
{
	
	/**
	 *  The test class of Dictionary class
	 * @throws FileNotFoundException 
	 */
   public static void main(String[] args) throws InterruptedException, FileNotFoundException 
   {
	   String strInput = "one";
	   
	   //call constructor
	   Dictionary _dictionary = new Dictionary();
	   
	   while(!(strInput.equals("quit")))
	   {
		   System.out.println("Enter the word you are looking for in the dictionary:");
		   Scanner userInput = new Scanner(System.in);
		   strInput = userInput.nextLine(); 
		   
		   if(_dictionary.validate(strInput))
		   {
			   System.out.println("Word Exists");
		   }
		   else
		   {
			   System.out.println("Word doesn't exist.");	
		   }
	   }
   }

}
